package com.sinodata.bsm.common.vo;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.SequenceGenerator;
import javax.persistence.Table;

/**
 * EventCorrelationPolicy entity. @author MyEclipse Persistence Tools
 */
@Entity
@Table(name = "EVENT_CORRELATION_POLICY")
public class EventCorrelationPolicy implements java.io.Serializable {

    /**
     * 
     */
    private static final long serialVersionUID = 9047172391806577857L;

    // Fields
    private Long id;
    private String name;
    private Long mainEventType;
    private String policyType;
    private String status;
    private Integer delay;
    private String extendConfig;
    private String memo;
    private Long resId;

    // Constructors

    /** default constructor */
    public EventCorrelationPolicy() {
    }

    /** minimal constructor */
    public EventCorrelationPolicy(Long id) {
        this.id = id;
    }

    /** full constructor */
    public EventCorrelationPolicy(Long id, String name, Long mainEventType, String policyType, String status, Integer delay, String extendConfig, String memo, Long resId) {
        this.id = id;
        this.name = name;
        this.mainEventType = mainEventType;
        this.policyType = policyType;
        this.status = status;
        this.delay = delay;
        this.extendConfig = extendConfig;
        this.memo = memo;
        this.resId = resId;
    }

    // Property accessors
    @Id
    @GeneratedValue(strategy = GenerationType.SEQUENCE, generator = "sequence")
    @SequenceGenerator(name = "sequence", sequenceName = "EVENT_CORRELATION_POLICY_SEQ")
    @Column(name = "ID", unique = true, nullable = false, precision = 22, scale = 0)
    public Long getId() {
        return this.id;
    }

    public void setId(Long id) {
        this.id = id;
    }

    @Column(name = "NAME", length = 50)
    public String getName() {
        return this.name;
    }

    public void setName(String name) {
        this.name = name;
    }

    @Column(name = "MAIN_EVENT_TYPE", precision = 22, scale = 0)
    public Long getMainEventType() {
        return this.mainEventType;
    }

    public void setMainEventType(Long mainEventType) {
        this.mainEventType = mainEventType;
    }

    @Column(name = "POLICY_TYPE", length = 10)
    public String getPolicyType() {
        return this.policyType;
    }

    public void setPolicyType(String policyType) {
        this.policyType = policyType;
    }

    @Column(name = "STATUS", precision = 1, scale = 0)
    public String getStatus() {
        return this.status;
    }

    public void setStatus(String status) {
        this.status = status;
    }

    @Column(name = "DELAY", precision = 22, scale = 0)
    public Integer getDelay() {
        return this.delay;
    }

    public void setDelay(Integer delay) {
        this.delay = delay;
    }

    @Column(name = "EXTEND_CONFIG", length = 1024)
    public String getExtendConfig() {
        return this.extendConfig;
    }

    public void setExtendConfig(String extendConfig) {
        this.extendConfig = extendConfig;
    }

    @Column(name = "MEMO", length = 256)
    public String getMemo() {
        return this.memo;
    }

    public void setMemo(String memo) {
        this.memo = memo;
    }

    @Column(name = "RES_ID", precision = 22, scale = 0)
    public Long getResId() {
        return resId;
    }

    public void setResId(Long resId) {
        this.resId = resId;
    }

    @Override
    public String toString() {
        return "EventCorrelationPolicy [id=" + id + ", name=" + name + ", mainEventType=" + mainEventType + ", policyType=" + policyType + ", status=" + status + ", delay=" + delay + ", extendConfig=" + extendConfig + ", memo=" + memo + ", resId=" + resId + "]";
    }

}